package com.example.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.mail.internet.AddressException;
import javax.xml.crypto.Data;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.security.GeneralSecurityException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.Calendar;
import java.util.Date;

/**
 * @program: demo
 * @description:
 * @author: Mr.Wang
 * @create: 2020-06-11 10:29
 **/
@RequestMapping("/s")
@RestController
public class SendMailController {

    public static void main(String[] args) throws Exception {
        Date date = new Date();
        long time = date.getTime();
        System.out.println(time);


        Date d = new Date(Long.parseLong("1596383999999"));
        System.out.println(d);
        //格式化日期
//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//        String firstDayOfMonth = sdf.format(cal.getTime());
        /*Date date = new Date(new java.util.Date().getTime());
        Thread.sleep(5000);
        List<MallSku> list = new ArrayList<>();
        MallSku mallSku = new MallSku();
        mallSku.setDate(date);
        mallSku.setDate1(date);
        list.add(mallSku);
        List<MallSku> collect1 = list.stream().filter(admin -> (admin.getDate().before(date) && admin.getDate1().after(date))
                || admin.getDate().equals(date)
                || admin.getDate1().equals(date))
                .collect(Collectors.toList());
        System.out.println(collect1.size());
        System.out.println(date.getTime());
        System.out.println(new Date(new java.util.Date().getTime()).getTime());
        System.out.println(date.toString());*/
    }

    private static int testInt(Integer a) {
        a++;
        return a;
    }
}
